Skip to main content

Permissions

This page describes the available permissions in the Velolink API. Each permission is a combination of the reserved namespace (velolink) and the specific permission name. All permissions are avilable in the console to be associated with a role.

Permission Matrix

PermissionCreateReadUpdateDeleteDescription
velolink.learningXXXAccess vehicle learning status
velolink.settings.geojson.fileManage GeoJSON file uploads and configurations
velolink.settings.geojson.dataManage GeoJSON data and properties
velolink.gtfsXXXAccess GTFS transit data
velolink.settings.gtfsconfigManage GTFS configuration settings
velolink.settings.markerManage map marker key locations settings and configurations
velolink.dataXXXAccess historical vehicle, route, trip, and journey data

Legend

  • ✓ : Permission available
  • X : Permission not available

Notes

note
  • All permissions are prefixed with the reserved namespace velolink
  • Data, GTFS, and Learning permissions only support read operations for security and data integrity
  • Settings-related permissions (geojson, gtfsconfig, marker) support full CRUD operations
  • Permissions are preconfigured and available to be associated with roles in the console.

Below is a detailed mapping of the Velolink GraphQL API queries and their required READ permissions:

velolink.settings.geojson.file

getGeoJsonFile(namespace: String!, name: String!): String

velolink.settings.geojson.data

getGeoJson(namespace: String!, id: String!): GeoJson
listGeoJson(namespace: String!, page: Int!, per_page: Int!): [GeoJson]

velolink.settings.gtfsconfig

gtfsConfig(namespace: String!): Config

velolink.settings.marker

marker(namespace: String!, id: String!): Marker
markers(namespace: String!, page: Int!, per_page: Int!): [Marker]

velolink.gtfs

route(namespace: String!, id: String!): Route
routes(namespace: String!, page: Int!, per_page: Int!): [Route]
trip(namespace: String!, id: String!): Trip
trips(namespace: String!, routeId: String!): [Trip]

velolink.data

journeys(
namespace: String!
createdAfter: String
createdBefore: String
markerName: String
beginLat: Float
beginLong: Float
beginRadius: Int
endLat: Float
endLong: Float
endRadius: Int
type: String
page: Int
per_page: Int
): [Journey]

latest(namespace: String!, vehicleId: String): JSON

historical(
namespace: String!
routeId: String
tripId: String
createdAfter: String
createdBefore: String
lat: Float
long: Float
radius: Int
type: String
page: Int
per_page: Int
): [Data]

events(
namespace: String!
eventType: String
routeId: String
tripId: String
vehicleId: String
createdAfter: String
createdBefore: String
page: Int
per_page: Int
): [Event]

velolink.learning

learningStates(namespace: String!): [LearningState]
learningState(namespace: String!, deviceId: String!): LearningState

Notes

note
  • All queries require a valid API token with the appropriate permission
  • The namespace parameter is required for most queries to scope the data access
tip

When requesting API tokens, make sure to select the appropriate permissions based on your application's needs. It's recommended to follow the principle of least privilege and only request permissions that are necessary for your specific use case.

Below is a detailed mapping of the Velolink GraphQL API mutations for creating resources and their required CREATE permissions:

velolink.settings.geojson.file

uploadGeoJson(
namespace: String!,
name: String!,
description: String!,
file: File!
): GeoJson

velolink.settings.marker

createMarker(
namespace: String!,
name: String!,
description: String!,
lat: Float!,
long: Float!,
radius: Int!
): Marker

Below is a detailed mapping of the Velolink GraphQL API mutations for updating resources and their required UPDATE permissions:

velolink.settings.gtfsconfig

setGtfs(
namespace: String!,
gtfs: String!,
gtfsrt: String!,
agency: String!,
timezone: String!,
headers: JSON
): String

velolink.settings.marker

updateMarker(
id: String!,
namespace: String!,
name: String!,
description: String!,
lat: Float!,
long: Float!,
radius: Int!
): Marker

Below is a detailed mapping of the Velolink GraphQL API mutations for deleting resources and their required DELETE permissions:

velolink.settings.geojson.data

deleteGeoJson(
namespace: String!,
id: String!,
name: String!
): GeoJson

velolink.settings.marker

deleteMarker(
namespace: String!,
id: String!
): Marker

Notes

note
  • All mutations require a valid API token with the appropriate permission
  • The namespace parameter is required for all operations to scope the data access
  • CREATE, UPDATE, and DELETE operations are only available for settings-related resources
  • All mutations return the affected resource type or a confirmation string
  • File uploads (for GeoJSON) require multipart form data handling
tip

When requesting API tokens, make sure to select the appropriate permissions based on your application's needs. It's recommended to follow the principle of least privilege and only request permissions that are necessary for your specific use case.